﻿<%@ Page Language="C#" MasterPageFile="~/TownshipEnterprise/Town.master" AutoEventWireup="true"
 CodeFile="AllList.aspx.cs" Inherits="TownshipEnterprise_AllList" Title="无标题页" StylesheetTheme="Content" %>

<%@ Register src="../UserContral/ListPageContral.ascx" tagname="ListPageContral" tagprefix="uc1" %>



<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<%--    <ul class="topmenu">
        <li>隶属单位：
            <asp:DropDownList ID="DptDepartment" Width="300px" runat="server">
            </asp:DropDownList>
        </li>    
        <li>消防站(队)名称：<asp:TextBox ID="txtName" runat="server" Width="200px"></asp:TextBox>
        </li>      
        <li>
            <asp:LinkButton ID="BtnSearch" runat="server" onclick="BtnSearch_Click" >查 询</asp:LinkButton>
        </li>
    </ul>--%>
    
    
    
    
    <table border="0" cellpadding="0" cellspacing="0" class="dialog" width="770px">
        <caption>
            <asp:Label ID="lblTitle" runat="server" Text=""></asp:Label></caption>
        <tr>
            <td style="width: 100%; margin: 0; padding: 0;" align="left">
                <asp:GridView ID="GvwList" runat="server" AutoGenerateColumns="False" PageSize="15"
                    OnRowDataBound="GvwList_RowDataBound" AllowPaging="True" DataKeyNames="Id" 
                    onrowcommand="GvwList_RowCommand" onrowdeleting="GvwList_RowDeleting" 
                    EnableViewState="False">
                    <Columns>
<asp:TemplateField><ItemTemplate>
                                <asp:Label ID="lblID" runat="server"></asp:Label>&nbsp;
                            
</ItemTemplate>

<ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
</asp:TemplateField>
                        <asp:BoundField DataField="Army" HeaderText="单位名称"  >
                       
                        </asp:BoundField>
                        
                        <asp:TemplateField HeaderText="单位地址">
                            <ItemTemplate>
                               <%# GetStationType(Eval("Address"))%>
                            </ItemTemplate>                      
                        </asp:TemplateField>
                        <asp:BoundField DataField="ArmyLeadName" HeaderText="领导姓名" />
                        <asp:BoundField DataField="ArmyLeadTel" HeaderText="联系电话" />
                        <asp:BoundField DataField="MemberCount" HeaderText="队员人数" />   
                                            
                        
                        <asp:TemplateField  ItemStyle-HorizontalAlign="Center" 
                            HeaderText="车辆">
                            <ItemTemplate >
                        <a href="VehicleList.aspx?where= <%# "TownBasicID=\'"+Eval("Id") +"\'"%>" \>车辆</a>
                        </ItemTemplate>

<ItemStyle HorizontalAlign="Center"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="器材" ItemStyle-HorizontalAlign="Center" >
                        <ItemTemplate >
                        <a href="DeviceList.aspx?where= <%# "TownBasicID=\'"+Eval("Id") +"\'"%>" \>器材</a>
                        </ItemTemplate>

<ItemStyle HorizontalAlign="Center"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="营房" ItemStyle-HorizontalAlign="Center" >
                        <ItemTemplate >
                        <a href='BarracksView.aspx?id=<%#Eval("Id") %>'>营房</a>
                        </ItemTemplate>

<ItemStyle HorizontalAlign="Center"></ItemStyle>
                        </asp:TemplateField>
                       <asp:CommandField HeaderText="删除" ShowDeleteButton="True" DeleteText="删除">
                            <ItemStyle ForeColor="Red" HorizontalAlign="Center" Wrap="False" Width="50px" />
                            <HeaderStyle HorizontalAlign="Center" Wrap="False" />
                            </asp:CommandField>
                    </Columns>
                    <PagerTemplate>
                    </PagerTemplate>
                </asp:GridView>
            </td>
        </tr>
    </table>

    <uc1:ListPageContral ID="ListPageContral1" PageSize="15" runat="server" OnPageSizeChange="ListPageContral1_PageSizeChange" />

</asp:Content>

